// $Id: Access.cs 66 2008-05-07 19:57:30Z nvivo $

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.OleDb;
using System.IO;
using System.Text;

namespace DBLGen.Plugins.Import
{
    [Plugin("Microsoft Access Importer")]
    [PluginSettings(typeof(AccessSettings), typeof(AccessSettingsEditor))]
    public class Access : BaseOleDbImportPlugin
    {
        public new AccessSettings Settings
        {
            get
            {
                return (AccessSettings) base.Settings;
            }
            set
            {
                base.Settings = value;
            }
        }

        protected override DbConnection CreateConnection()
        {
            OleDbConnection connection = new OleDbConnection();
            connection.ConnectionString = String.Format("Provider=Microsoft.Jet.OleDb.4.0; Data Source={0};", Settings.FilePath);
            return connection;
        }
    }
}
